<script setup lang="ts">
import { onMounted } from 'vue'
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
// import en from 'element-plus/lib/locale/lang/en'
// import { getLocalLanguage, setLocalLanguage } from './utils/common.js'

const locale = zhCn

onMounted(() => {
  // let language = getLocalLanguage()
  // if (language == null) {
  //   language = 'zh'
  // }
  // setLocalLanguage(language)
  // if (language === 'zh') {
  //   locale = zhCn
  // } else {
  //   locale = en
  // }
})

</script>

<template>
  <el-config-provider :locale="locale">
      <router-view></router-view>
  </el-config-provider>

</template>

<style scoped>
body {
  width: 100%;
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

html {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

#app {
  width: 100%;
  height: 100%;
}
</style>
